The Plan 9 session with acme and other programs. |
|
Company / developer | Bell Labs |
Programmed in | Dialect of ANSI C |
Working state | Current |
Source model | Free and open source software |
Initial release | 1992 (universities) / 1995 (general public) |
Latest stable release | Fourth Edition / 28 April 2002 |
Latest unstable release | Snapshots / daily |
Available language(s) | English |
Update method | replica |
Supported platforms | x86 / Vx32, x86-64, MIPS, DEC Alpha, SPARC, PowerPC, ARM |
Default user interface | rio / rc |
License | Lucent Public License |
Official website | plan9.bell-labs.com/plan9 |
Plan 9 from Bell Labs is a distributed operating system. It was developed primarily for research purposes as the successor to Unix by the Computing Sciences Research Center at Bell Labs between the mid-1980s and 2002. Plan 9 continues to be used and developed by operating system researchers and hobbyists;[1][2] though Plan 9 is not as popular as Unix derivatives, it has an expanding community of developers.[3]
Along with strict following of everything is a file Unix philosophy concept, Plan 9 is known for its novel features such as uniform medium-agnostic access to the local and remote resources with a 9P protocol, union mounts, improved proc file system and native unicode support throughout the system. In Plan 9 all system interfaces, including those required for networking and the user interface, are represented through the file system rather than specialized interfaces, thus allowing system administrators to build single system image clusters by using basic tools such as mount.
The name Plan 9 from Bell Labs is a reference to the 1959 cult science fiction Z-movie Plan 9 from Outer Space.[4]
Contents |
Plan 9 replaced Unix at Bell Labs as the organization's primary platform for research. It explored several changes to the original Unix model that facilitate the use and programming of the system, notably in distributed multi-user environments. Plan 9 was a Bell Labs internal project from its start during the mid 1980s. In 1992, Bell Labs provided the first public release to universities. In 1995, a commercial second release version became available to the general public. In the late 1990s, Lucent Technologies, having inherited Bell Labs, dropped support for commercial interests in the project. In 2000, a non-commercial third release was distributed under an open source license. A fourth release under a new free software license occurred in 2002.[5]
A user and development community, including current and former Bell Labs members and Massachusetts Institute of Technology personnel, continues to produce minor daily releases in form of ISO images. Bell Labs still hosts the development.[6] The development source tree is accessible over the 9P and HTTP protocols and is used to update existing installations.[7] In addition to the official components of the OS included in the ISOs, Bell Labs also hosts a repository of externally developed applications and tools.
Plan 9 from Bell Labs was originally developed by members of the Computing Science Research Center at Bell Labs, the same group that developed original UNIX and C.[8] The Plan 9 team was originally led by Rob Pike, Ken Thompson, Dave Presotto and Phil Winterbottom with support from Dennis Ritchie as head of the Computing Techniques Research Department. Over the years many notable developers have contributed to the project including Brian Kernighan, Tom Duff, Doug McIlroy, Bjarne Stroustrup, Bruce Ellis, Steve Simon and others.[9]
Plan 9 from Bell Labs is like the Quakers: distinguished by its stress to "Inner Light," noted for simplicity of life, in particular for plainness of speech, like the Quakers, Plan 9 does not proselytize.
— Sape J. Mullender, Pierre G. Janson, Real Time in Real Operating System[10]
Plan 9 is an evolution of UNIX design concepts:[11]
Plan9 is a grid computing platform. It is an effort to provide computing environment for geographically distributed cluster running on heterogeneous hardware, engineered for modern distributed environments and designed from the start to be a networked operating system.[12] It can be installed and used on a single self-contained system, but also has the capability to separate the functional components of the OS between separate hardware platforms. In a typical Plan 9 installation, users work at lightweight terminals running the rio GUI and connect via the network to CPU servers that handle computation-intensive processes, with permanent data storage provided by additional hosts acting as file servers and archival storage.[13] Currently available desktop computers can also re-create this architecture internally using multiple virtual machines.
To reduce the number of custom APIs and system calls, Plan 9 makes heavy use of universal 9P protocol. 9p is generic medium-agnostic byte-oriented protocol that allows delivering messages between server and client.[14]
The typical mode of operation for Plan 9 application is a file server, which is accessible with 9P regardless of the application's nature.[10] Thus the protocol is used to refer to and communicate with processes, programs, and data, including both the user interface and the network.[15] With the release of the 4th edition, it was modified and renamed 9P2000.[5]
Unlike most other operating systems Plan9 doesn't provide special application programming interfaces (like Berkeley sockets, X resources or ioctl system calls) to access the devices.[14] Instead, Plan9 device drivers implement the control interfaces as file system hierarchies, so that the hardware functionality can be accessed by the ordinary file input/output operations read and write. Consequently, sharing the device across the network can be accomplished regardless of driver's networking capabilities by mounting the corresponding directory tree to the target machine.[4]
Plan9 allows the user to collect the files (names) from different directory trees in a single location. The name resolution is then performed from top to bottom: if the name doesn't exist in top directory, it is looked up in lower one, until found. The same name in lower directories will be shown in directory listing, but won't be accessible, thus subdirectories merging isn't handled.[16]
A union directory can be created by using bind
command. In following example /home/val/bin
will be union mounted after /bin
, as requested by option -a
:
; bind -a /home/val/bin /bin
In this example, if the name can't be found in the contents of /bin
directory, it will be looked up in /home/val/bin
.
This mechanism of union directories replaces the search path of conventional UNIX shells. As far as you are concerned, all executable programs are in
/bin
.
Furthermore, the systems keeps separate mount tables for each process,[10] thus providing every application with a view of the system as a single, coherent namespace that appears as a hierarchical file system but may represent local or remote (physically separated over the network) resources. The namespace of each process can be constructed independently, and the user may work simultaneously with applications with heterogeneous namespaces.[17] The namespaces may be used to create an isolated environment similar to chroot in a more secure way.[14]
Plan 9's union directories inspired BSD and Linux union file systems implementations.[18]
Instead of requiring special software for process management Plan 9 provides a file system hierarchy of running processes under the /proc
directory. Each process appears as a named object — directory with information and control files — which can be manipulated by the ordinary means of input/output.[16]
The file system approach to the process management allows Plan 9 users to manage processes with file management tools like ls and cat; however, copying and moving the processes like other files isn't allowed.[20]
Plan 9 does not have system calls for the multitude of communication protocols or device driver interfaces; instead the /net
file server is used as the API for all TCP/IP. This allows to write data to control files to write and read connections (even with scripts or shell tools). Relevant sub-directories like /net/tcp
and /net/udp
are used to interface to respective protocols.[20]
To reduce the complexity of managing character encodings Plan 9 uses Unicode throughout the system. Though initial Unicode implementation was the ISO 10646, Ken Thompson invented UTF-8, which became the native encoding in Plan 9. The entire system was converted to general use in 1992.[21] UTF-8 preserves backward compatibility with traditional null terminated strings enabling more reliable information processing and chaining of multilingual string data with Unix pipes between multiple processes. Using a single UTF-8 encoding, which includes characters for all cultures and regions eliminates the need in locale mechanism, since no switching between code sets is needed.[22]
Though interesting on their own, the design concepts of Plan 9 were supposed to be most useful when combined together.
For example, to implement network address translation (NAT) server one can simply create a union directory overlaying the router's /net
directory tree with its own /net
. Similarly one can implement a virtual private network (VPN) by overlaying in a union directory a /net
hierarchy from a remote gateway, using secured 9P over the public Internet. Union directory with /net
hierarchy and filters can be used to sandbox an untrusted application or to implement a firewall.[14]
The same way the distributed computing network can be composed with union directory of /proc
hierarchies from remote hosts, which allows interacting with them as if they are local.
Combining the above methods one can assemble a complex distributed computing environment with user terminals, file servers that store permanent data, and other servers that provide additional processors, user authentication, and network gateways, all reusing the existing hierarchical name system.[20]
Plan 9 distribution includes its own variant of compilers and programing languages and provides Plan 9 specific set of libraries and windowing user interface system.[23] Its compiler is a dialect of C with some extensions and restrictions.[24]
As a benefit from the system's design, most tasks in Plan 9 can be accomplished by using ls, cat, grep, cp and rm utilities in combination with the rc shell (the default Plan 9 shell).
Factotum is an authentication and key management server for Plan 9. It handles authentication on behalf of other programs such that both secret keys and implementation details need only be known to Factotum.[25]
Plan 9 was initially designed to make use of windowing system; which differentiates it from Unix-like operating systems.[15] When used with supported video card, by default Plan 9 will boot into rio windowing system,[26] where user can create new windows with terminal emulator running rc. Graphical applications invoked from shell replace it in its window.
The plumber utility provides user with am inter-process communication (IPC) mechanism, which allows to pass resources to the default applications in a way similar to a double click on file objects in most graphical file managers of modern systems.
For text editing the standard installation of Plan 9 provides sam (simpler) and acme (more advanced) text editors.[27]
Plan 9 supports FAT and Fossil file systems. The latter was deigned in Bell Labs specifically for Plan 9 and provides the snapshot storage capability. It can be used directly with hard drive or backed with Venti — the archival file system and permanent data storage system.
Though Plan 9 was supposed to be a further development of UNIX concepts, the compatibility with preexisting UNIX software was never the goal for the project. Still many command line utilities of Plan 9 have aliases to the names of their UNIX counterparts.[19]
Plan 9 can support POSIX applications and can emulate the Berkeley socket interface through the ANSI/POSIX Environment (APE).[28] Some Linux binaries can be used with the help of linuxemu application; however, it is still a work in progress.[29]
Plan 9 demonstrated that a central concept of Unix – that every system interface could be represented as sets of files – could be successfully implemented in a modern distributed system.[26] Some features from Plan 9, like the UTF-8 character encoding of Unicode, have been implemented in other operating systems. Unix-like operating systems such as Linux have implemented 9P, Plan 9's file system and limited forms of rfork-like system calls. Additionally, in Plan 9 from User Space, several of Plan 9's applications and tools, including the rc shell, have been ported to Unix and Linux systems and have achieved some level of popularity. Several projects seek to replace the GNU operating system programs surrounding the Linux kernel with the Plan 9 operating system programs.[31][32] 9wm window manager is designed after 8½ (the older windowing system of Plan 9);[33] wmii is also heavily influenced by Plan 9.[30]
However, Plan 9 has never approached Unix in popularity, and was primarily a research tool:
Plan 9 failed simply because it fell short of being a compelling enough improvement on Unix to displace its ancestor. Compared to Plan 9, Unix creaks and clanks and has obvious rust spots, but it gets the job done well enough to hold its position. There is a lesson here for ambitious system architects: the most dangerous enemy of a better solution is an existing codebase that is just good enough.
Other reasons of critical reception include the lack of commercial backup, low amount of end user software and device drivers.[26][27]
Plan 9 proponents and developers claim that the problems hindering its adoption have been solved, and its original goals as a distributed system, development environment, and research platform have been met, and that it enjoys moderate but growing popularity.[10] Inferno, through its hosted capabilities, has been a vehicle to bring Plan 9 technologies to other systems as hosted part of heterogeneous computing grids.[34][35][36][37]
Several projects actively work to extend the Plan 9, including 9atom and Plan 9 from The People's Front of Cat-v.org (plan9front). These forks augment Plan 9 with additional hardware drivers and software including nupas (improved Upas e-mail file system), go compiler, Mercurial version control system support and other programs.[2][38]
The full source code is freely available under Lucent Public License 1.02, and considered to be open source by the Open Source Initiative (OSI) and free software by the Free Software Foundation. It passes the Debian Free Software Guidelines.[14] However, it is incompatible with the GNU General Public License.[39]
|
|